﻿/// <reference path="../../../Ext-4.1.1a/ext.js" />
/**
 * describe:文章管理视图
 * author:dpyang
 */
Ext.define('WeCompany.view.Content.View', {
    extend: 'Ext.container.Container',
    alias: 'widget.contentview',
    layout: 'border',

    initComponent: function () {
        var me = this;

        me.tree = Ext.widget('treepanel', {
            title: '文章类别',
            region: 'west',
            collapsible: true,
            rootVisible: true,
            store: 'CategoriesTree',
            width: 200,
            minWidth: 100,
            split: true
        });

        me.grid = Ext.widget('grid', {
            title: "文章列表",
            region: "center",
            store: "Contents",
            selType: "checkboxmodel",
            selModel: {
                checkOnly: false,
                mode: "MULTI"
            },
            columns: [{
                text: '编号',
                dataIndex: 'ContentId',
                width: 80
            }, {
                text: '标题',
                dataIndex: 'Title',
                flex: 1
            }, {
                xtype: "datecolumn",
                text: '创建时间',
                dataIndex: 'Created',
                format: "Y-m-d H:i:s",
                width: 150
            }, {
                text: '排序序数',
                dataIndex: 'SortOrder',
                width: 80
            }, {
                text: '点击量',
                dataIndex: 'Hits',
                width: 80
            }, {
                text: '标签',
                dataIndex: 'Tags',
                width: 150
            }]
        });

        me.items = [me.tree, me.grid];

        me.callParent(arguments);
    }
});